// fs_wmall/paotui/pages/index/index.js
var base = require('../../../utils/lang.js');
const _ = base._

Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		navs: [{
				title: _('帮买'),
				url: '/fs_wmall/paotui/pages/buy/buy',
				src: '/fs_wmall/paotui/image/index-nav1.png'
			},
			{
				title: _('帮送'),
				url: '/fs_wmall/paotui/pages/fetch/fetch',
				src: '/fs_wmall/paotui/image/index-nav2.png'
			},
			{
				title: _('帮取'),
				url: '/fs_wmall/paotui/pages/serve/serve',
				src: '/fs_wmall/paotui/image/index-nav3.png'
			},
			{
				title: _('代驾'),
				url: '/fs_wmall/paotui/pages/delivery/delivery',
				src: '/fs_wmall/paotui/image/index-nav4.png'
			},
		]
	},
	goUrl(e) {
		const {
			url
		} = e.currentTarget.dataset
		// console.log(url)
		wx.navigateTo({
			url
		})
	},
	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: function(options) {
		const isWei = base.isWeiFn()
		this.setData({
			isWei,
			navs: [{
					title: _('帮买'),
					url: '/fs_wmall/paotui/pages/buy/buy',
					src: '/fs_wmall/paotui/image/index-nav1.png'
				},
				{
					title: _('帮送'),
					url: '/fs_wmall/paotui/pages/fetch/fetch',
					src: '/fs_wmall/paotui/image/index-nav2.png'
				},
				{
					title: _('帮取'),
					url: '/fs_wmall/paotui/pages/send/send',
					src: '/fs_wmall/paotui/image/index-nav3.png'
				},
				{
					title: _('代驾'),
					url: '/fs_wmall/paotui/pages/delivery/delivery',
					src: '/fs_wmall/paotui/image/index-nav4.png'
				},
			]
		})
	},

	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function() {

	},

	/**
	 * 生命周期函数--监听页面显示
	 */
	onShow: function() {

	},

	/**
	 * 生命周期函数--监听页面隐藏
	 */
	onHide: function() {

	},

	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function() {

	},

	/**
	 * 页面相关事件处理函数--监听用户下拉动作
	 */
	onPullDownRefresh: function() {

	},

	/**
	 * 页面上拉触底事件的处理函数
	 */
	onReachBottom: function() {

	},

	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function() {

	}
})
